﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PRScreenWithKinect
{
    public delegate void KinectHandler(KinectEventArgs eKi);
    public class Handler
    {

        public static event KinectHandler SwipeLeft;
        public static event KinectHandler SwipeRight;
        public static event KinectHandler SwipeUp;
        public static event KinectHandler SwipeDown;
        public static event KinectHandler Push;
        public static event KinectHandler HumanIn;
        public static event KinectHandler HumanOut;
        public static event KinectHandler RHandMove;
        public static event KinectHandler LHandMove;
        public static event KinectHandler ColorFrame;
        public static event KinectHandler RHandIdle;
        public static event KinectHandler RHandActive;
        public static event KinectHandler LHandIdle;
        public static event KinectHandler LHandActive;

        //These method are called from Kinect Class
        public static void DoSwipeLeft(KinectEventArgs eKi)
        {
            if (SwipeLeft != null)
                SwipeLeft(eKi);
        }

        public static void DoSwipeRight(KinectEventArgs eKi)
        {
            if (SwipeRight != null)
                SwipeRight(eKi);
        }

        public static void DoPush(KinectEventArgs eKi)
        {
            if (Push != null)
                Push(eKi);
        }

        public static void DoHumanIn(KinectEventArgs eKi)
        {
            if (HumanIn != null)
                HumanIn(eKi);
        }

        public static void DoHumanOut(KinectEventArgs eKi)
        {
            if (HumanOut != null)
                HumanOut(eKi);
        }

        public static void DoRHandMove(KinectEventArgs eKi)
        {
            if (RHandMove != null)
                RHandMove(eKi);
        }

        public static void DoLHandMove(KinectEventArgs eKi)
        {
            if (LHandMove != null)
                LHandMove(eKi);
        }

        public static void DoSwipeUp(KinectEventArgs eKi)
        {
            if (SwipeUp != null)
                SwipeUp(eKi);
        }

        public static void DoSwipeDown(KinectEventArgs eKi)
        {
            if (SwipeDown != null)
                SwipeDown(eKi);
        }

        public static void DoColorFrame(KinectEventArgs eKi)
        {
            if (ColorFrame != null)
                ColorFrame(eKi);
        }

        public static void DoRHandIdle(KinectEventArgs eKi)
        {
            if (RHandIdle != null)
                RHandIdle(eKi);
        }

        public static void DoRHandActive(KinectEventArgs eKi)
        {
            if (RHandActive != null)
                RHandActive(eKi);
        }

        public static void DoLHandIdle(KinectEventArgs eKi)
        {
            if (LHandIdle != null)
                LHandIdle(eKi);
        }

        public static void DoLHandActive(KinectEventArgs eKi)
        {
            if (LHandActive != null)
                LHandActive(eKi);
        }
    }
}
